import request from '@/utils/request';

// 获取角色列表
export function getRoleList() {
  return request({
    url: '/api/api/roles/getRoleList',
    method: 'get',
  });
}

// 添加角色
export function addRole(data) {
  return request({
    url: '/api/api/roles/addRole',
    method: 'post',
    data,
  });
}

// 更新角色
export function updateRole(id, data) {
  return request({
    url: `/api/api/roles/updateRole/${id}`,
    method: 'put',
    data,
  });
}

// 删除角色
export function deleteRole(id) {
  return request({
    url: `/api/api/roles/deleteRole/${id}`,
    method: 'delete',
  });
} 